##Data Wrangling

##Exploratory Plots

##Statistical Analysis

Two sample t-test for value-to-weight ratio 1972 vs. 2022

## # A tibble: 11 × 2
##    species_group             p_value
##    <chr>                       <dbl>
##  1 Bivalves (Shellfish)    0.259    
##  2 Crustaceans             0.0769   
##  3 Drums & Croakers        0.0156   
##  4 Flatfish (Flounders)    0.0358   
##  5 Mackerels               0.222    
##  6 Mullets                 0.252    
##  7 Other                   0.208    
##  8 Other Common Finfish    0.0000337
##  9 Perches                 0.0446   
## 10 Shads                   0.438    
## 11 Unclassified Categories 0.288

ANOVA test across all years

##              Df    Sum Sq   Mean Sq F value   Pr(>F)    
## FINALWEIGHT   1 7.807e+14 7.807e+14   65.44 5.12e-15 ***
## Residuals   471 5.618e+15 1.193e+13                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Linear Model across all years

## 
## Call:
## lm(formula = FINALVALUE ~ FINALWEIGHT, data = fish_all)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -12043390  -1038478   -958461   -474322  27343344 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 1.048e+06  1.628e+05   6.438 2.98e-10 ***
## FINALWEIGHT 8.966e-02  1.108e-02   8.090 5.12e-15 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3454000 on 471 degrees of freedom
## Multiple R-squared:  0.122,  Adjusted R-squared:  0.1201 
## F-statistic: 65.44 on 1 and 471 DF,  p-value: 5.116e-15

MLR across all years

## 
## Call:
## lm(formula = FINALVALUE ~ FINALWEIGHT + species_group, data = fish_all)
## 
## Residuals:
##       Min        1Q    Median        3Q       Max 
## -12868469   -183198   -100557    115049  17009372 
## 
## Coefficients:
##                                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                           2.724e+06  4.280e+05   6.365 4.72e-10 ***
## FINALWEIGHT                           4.753e-02  7.280e-03   6.530 1.74e-10 ***
## species_groupCrustaceans              1.085e+07  6.173e+05  17.575  < 2e-16 ***
## species_groupDrums & Croakers        -2.221e+06  5.242e+05  -4.238 2.73e-05 ***
## species_groupFlatfish (Flounders)     1.130e+06  6.055e+05   1.866 0.062651 .  
## species_groupMackerels               -1.854e+06  6.053e+05  -3.063 0.002318 ** 
## species_groupMullets                 -2.017e+06  6.053e+05  -3.332 0.000932 ***
## species_groupOther                   -2.246e+06  5.780e+05  -3.887 0.000117 ***
## species_groupOther Common Finfish    -2.541e+06  4.499e+05  -5.647 2.86e-08 ***
## species_groupPerches                 -2.622e+06  6.053e+05  -4.331 1.82e-05 ***
## species_groupShads                   -2.647e+06  6.053e+05  -4.373 1.52e-05 ***
## species_groupUnclassified Categories -2.661e+06  5.527e+05  -4.814 2.01e-06 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2007000 on 461 degrees of freedom
## Multiple R-squared:  0.7097, Adjusted R-squared:  0.7028 
## F-statistic: 102.5 on 11 and 461 DF,  p-value: < 2.2e-16